fast calculation method